package org.example.diet_compass.service;

import org.example.diet_compass.domain.Orders;
import com.baomidou.mybatisplus.extension.service.IService;
import org.example.diet_compass.dto.OrderListResultDto;
import org.example.diet_compass.dto.OrdersDto;

/**
* @author 86135
* @description 针对表【orders(存储订单信息的表)】的数据库操作Service
* @createDate 2025-03-16 11:01:05
*/
public interface OrdersService extends IService<Orders> {

    Integer getOrderIdByUserIdAndState(int userId, String state);

    void updateOrderState(Integer orderId, String status);

   OrderListResultDto getOrdersByPage(int currentPage, int pageSize, Integer userId, String status);

    OrdersDto getOrderDetailByUserIdAndOrderId(Integer userId, Integer orderId);

    int getUserIdByOrderId(Integer orderId);
}
